<template>
	<view>
		<subscribe-item v-for="(item,index) in subscribeList" :key="index" :subscribeData="item"></subscribe-item>
	</view>
</template>

<script>
	import SubscribeItem from '@/components/SubscribeItem.vue';
	export default {
		components: {
			SubscribeItem
		},
		onLoad() {
			this.fetchData();
		},
		data() {
			return {
				subscribeList: [
					// {
					// 	status: 1,
					// 	url: '../../static/img/personbg.png',
					// 	name: '水浒盲盒·幸运盒子',
					// 	ordernum: 'K45265KIU241369252',
					// 	created_at: '2020.08.25 13:30:00'
					// },
					// {
					// 	status: 2,
					// 	url: '../../static/img/personbg.png',
					// 	name: '水浒盲盒·幸运盒子',
					// 	ordernum: 'K45265KIU241369252',
					// 	created_at: '2020.08.25 13:30:00'
					// }
				],

			};
		},
		methods: {
			fetchData() {
				this.$api.getSubscribeInfo().then(res => {
					res.data.map(v => {
						this.subscribeList.push({
							name: '水浒盲盒·幸运盒子',
							status: v.status,
							ordernum: v.ordernum,
							created_at: v.created_at,
						})
					})
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
</style>
